Optimal. Leaf size=124 \[ \frac {a^{3/2} (2 A+3 B) \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}+\frac {a^2 (2 A-B) \sqrt {\sec (c+d x)} \sin (c+d x)}{d \sqrt {a+a \sec (c+d x)}}+\frac {a B \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 124, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {4103, 4100,
3886, 221} \begin {gather*} \frac {a^{3/2} (2 A+3 B) \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{d}+\frac {a^2 (2 A-B) \sin (c+d x) \sqrt {\sec (c+d x)}}{d \sqrt {a \sec (c+d x)+a}}+\frac {a B \sin (c+d x) \sqrt {\sec (c+d x)} \sqrt {a \sec (c+d x)+a}}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 221
Rule 3886
Rule 4100
Rule 4103
Rubi steps
\begin {align*} \int \frac {(a+a \sec (c+d x))^{3/2} (A+B \sec (c+d x))}{\sqrt {\sec (c+d x)}} \, dx &=\frac {a B \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{d}+\int \frac {\sqrt {a+a \sec (c+d x)} \left (\frac {1}{2} a (2 A-B)+\frac {1}{2} a (2 A+3 B) \sec (c+d x)\right )}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {a^2 (2 A-B) \sqrt {\sec (c+d x)} \sin (c+d x)}{d \sqrt {a+a \sec (c+d x)}}+\frac {a B \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{d}+\frac {1}{2} (a (2 A+3 B)) \int \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {a^2 (2 A-B) \sqrt {\sec (c+d x)} \sin (c+d x)}{d \sqrt {a+a \sec (c+d x)}}+\frac {a B \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{d}-\frac {(a (2 A+3 B)) \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{a}}} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=\frac {a^{3/2} (2 A+3 B) \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}+\frac {a^2 (2 A-B) \sqrt {\sec (c+d x)} \sin (c+d x)}{d \sqrt {a+a \sec (c+d x)}}+\frac {a B \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.58, size = 107, normalized size = 0.86 \begin {gather*} \frac {a^2 \left (2 A \text {ArcSin}\left (\sqrt {1-\sec (c+d x)}\right )-3 B \text {ArcSin}\left (\sqrt {\sec (c+d x)}\right )+(B+2 A \cos (c+d x)) \sqrt {(-1+\cos (c+d x)) \sec ^2(c+d x)}\right ) \tan (c+d x)}{d \sqrt {1-\sec (c+d x)} \sqrt {a (1+\sec (c+d x))}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(345\) vs.
\(2(110)=220\).
time = 8.14, size = 346, normalized size = 2.79
method | result | size |
default | \(\frac {\sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (2 A \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )-\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}\, \cos \left (d x +c \right ) \sin \left (d x +c \right )-2 A \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}\, \cos \left (d x +c \right ) \sin \left (d x +c \right )+3 B \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )-\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}\, \cos \left (d x +c \right ) \sin \left (d x +c \right )-3 B \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}\, \cos \left (d x +c \right ) \sin \left (d x +c \right )-8 A \left (\cos ^{2}\left (d x +c \right )\right )+8 A \cos \left (d x +c \right )-4 B \cos \left (d x +c \right )+4 B \right ) \sqrt {\frac {1}{\cos \left (d x +c \right )}}\, a}{4 d \sin \left (d x +c \right )}\) | \(346\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 1417 vs.
\(2 (110) = 220\).
time = 0.65, size = 1417, normalized size = 11.43 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.19, size = 364, normalized size = 2.94 \begin {gather*} \left [\frac {{\left ({\left (2 \, A + 3 \, B\right )} a \cos \left (d x + c\right ) + {\left (2 \, A + 3 \, B\right )} a\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - \frac {4 \, {\left (\cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}} + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right ) + \frac {4 \, {\left (2 \, A a \cos \left (d x + c\right ) + B a\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{4 \, {\left (d \cos \left (d x + c\right ) + d\right )}}, \frac {{\left ({\left (2 \, A + 3 \, B\right )} a \cos \left (d x + c\right ) + {\left (2 \, A + 3 \, B\right )} a\right )} \sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - 2 \, a}\right ) + \frac {2 \, {\left (2 \, A a \cos \left (d x + c\right ) + B a\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{2 \, {\left (d \cos \left (d x + c\right ) + d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{\frac {3}{2}} \left (A + B \sec {\left (c + d x \right )}\right )}{\sqrt {\sec {\left (c + d x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{3/2}}{\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________